package com.ycq.testng;

import org.testng.annotations.Test;

public class ExpectedException {
    /**
     * 异常测试
     */
    @Test(expectedExceptions = RuntimeException.class)
    public void test1(){
        System.out.println("失败的异常测试");
        throw new RuntimeException();
    }
}
